<!--COLUMN 1-->
<div class="FourColGrid_c1">
<?php 
            if($UserInfo['User']['Avatar'])
            {
                echo '<img src="'. Router::url('/').'app/webroot/img/avatar/'.$UserInfo['User']['Avatar'].'" width="100" height="100" alt="Locum">';
            }else
            {
                echo '<img src="'.Router::url('/').'app/webroot/img/avatar.jpg" width="100" height="100" alt="Locum">';
            }
?>
</div>
<!--COLUMN 1-->

<!--COLUMN 2-->
<div class="FourColGrid_c2">

<h1 class="TitleTwo">Add a vacancy</h1>
<?php $session->flash(); ?>    
<?php echo $form->create('Vacancy',array('action' => 'add'));?>  

<table border="0" cellspacing="0" cellpadding="0">

<tr>
<td valign="top"><b>Select Store</b></td>
<td>
<select name="data[Vacancy][Store_id]">
<?php if($a_ListStores){
                    foreach($a_ListStores as $a_Store)
                    {
                         echo  ' <option value="'.$a_Store['Store']['Id'].'">'.$a_Store['Store']['Username'].'</option>'   ;
                    }
}?>
</select>
</td>
</tr>

<tr>
<td valign="top"><b>Title</b></td>
<td valign="top"><?php echo $form->input('Title',array('label'=>'','div'=>'', 'size' => 40)); ?></td>      
</tr>

<tr>
<td valign="top"><b>Hourly rate &pound;</b></td>
<td valign="top"><?php echo $form->input('HourlyRate',array('type'=>'text','label'=>'','div'=>''),false); ?></td>      
</tr>

<tr>
<td valign="top"><b>Milage allowance after miles</b></td>
<td valign="top"><?php echo $form->input('MilageAllowanceAfterMiles',array('label'=>'','div'=>'')); ?></td>
</td>
</tr>

<tr>
<td valign="top"><b>Milage rate in pence</b></td>
<td valign="top"><?php echo $form->input('MilageRateInPence',array('label'=>'','div'=>'')); ?></td>
</tr>

<tr>
<td valign="top"><b>Other expenses</b></td>
<td valign="top"><?php echo $form->input('OtherExpenses',array('label'=>false,'type'=>'textarea')); ?></td>
</tr>

<tr>
<td valign="top">&nbsp;</td>
<td valign="top"><input type="submit" name="Submit" value="Submit" id="addVacancy"></td>
</tr>
</table>
<?php echo $form->input('event',array('label'=>'','id'=>'event','type'=>'hidden')); ?>
</form>
</div>
<!--COLUMN 2-->

<!--COLUMN 3-->
<div class="FourColGrid_c3">
<div id="eventCalendarNoCache"></div>
<script>
$(document).ready(function() {
	$("#eventCalendarNoCache").eventCalendar({
	eventsjson:'',
	cacheJson: false,
	multiple: true,
	fromTo:false
});
});
</script>

<p><b>Please select vacancy dates on the calendar above</b></p>
<p>&nbsp;</p>
<p>Calendar key</p>
<ul class="listTwo">
<li class="unavailable"> = Vacancy</li>
</ul>
</div>
<!--COLUMN 3-->

<!--COLUMN 4-->
<div class="FourColGrid_c4">
<h6 class="TitleFive">Locum Search</h6>
<?php echo $this->element('search_for_pharmacy');?>

<?php if ($session->read('User.User.UserType') == 2):?>
<br>
<?php echo $this->element('invite_pharmacy');?>
<?php endif;?>

<?php if ($session->read('User.User.UserType') == 3):?>
<br>
<?php echo $this->element('invite_store');?>
<?php endif;?>

</div>
<!--COLUMN 4-->

<script>
    $(document).ready(function(){
        $('#addVacancy').click(function(){
            if($('#event').val()=='')
            {
                alert('Please choose a date in the date range');
                return false;
            }
        });
    });
</script>